package com.treasure.web.mapstruct;

import com.treasure.common.model.PageResult;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingTarget;
import org.mapstruct.factory.Mappers;

/**
 * @author sunhongmin
 * @date 2024/1/14 13:44
 * @description
 */
@Mapper
public interface PageResultConvert {
    PageResultConvert INSTANCE = Mappers.getMapper(PageResultConvert.class);

    @Mapping(target = "records", ignore = true)
    void convert(PageResult<?> source, @MappingTarget PageResult<?> target);
}
